package com.headwind.logistics.logistics.mapper;

import com.headwind.logistics.common.pojo.Coupon;
import com.headwind.logistics.logistics.dto.LogisticsIntegralTypeDTO;
import com.headwind.logistics.logistics.pojo.LogisticsIntegral;
import com.headwind.logistics.logistics.pojo.LogisticsIntegralMall;
import com.headwind.logistics.logistics.pojo.LogisticsIntegralMallDetail;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Author 小恶魔
 * @Date 2020-08-02 12:48
 * @Version 1.0
 * @DESCRIPTION 前台客户财富数据访问层
 */
public interface LogisticsCustomerFortuneMapper {

    /**
     * 根据客户id获取积分详情
     * @param customerId
     * @return
     */
    List<LogisticsIntegralTypeDTO> queryIntgralDetailByCustomerId(Long customerId);

    /**
     * 获取积分商城所有的商城
     * @return
     */
    List<LogisticsIntegralMall> queryAllIntegralMall();

    /**
     * 添加积分商城明细表
     * @param logisticsIntegralMallDetail
     * @return
     */
    Integer addIntegralMallDetail(LogisticsIntegralMallDetail logisticsIntegralMallDetail);

    /**
     * 添加积分记录表
     * @param logisticsIntegral
     * @return
     */
    Integer addIntegral(LogisticsIntegral logisticsIntegral);

    /**
     * 添加优惠卷
     * @param coupon
     * @return
     */
    Integer addCoupon(Coupon coupon);

    /**
     * 修改顾客积分
     * @param integral
     * @param customerId
     * @return
     */
    Integer updateCustomerIntegralById(@Param("integral")Integer integral,@Param("customerId")Long customerId);
}
